{% load static %}
<script type="text/javascript" charset="utf-8">
window.IMG_DELETELINK_PATH = "{% static 'feincms/img/icon_deletelink.gif' %}";

window.REGION_MAP = [{% for region in original.template.regions %}'{{ region.key }}'{% if not forloop.last %}, {% endif %}{% endfor %}];
window.REGION_NAMES = [{% for region in original.template.regions %}'{{ region.title|capfirst }}'{% if not forloop.last %}, {% endif %}{% endfor %}];
window.ACTIVE_REGION = 0;

CONTENT_NAMES = {
    {% for name, value in content_types %}'{{ value }}': '{{ name|capfirst }}'{% if not forloop.last %},{% endif %}
    {% endfor %}
};

var contentblock_init_handlers = [];
var contentblock_move_handlers = {poorify: [
        function(item) {item.find('.item-content').hide();},
        function(item) {item.find('input[type=radio][checked]').addClass('radiochecked');}
    ], richify: [
        function(item) {item.find('.item-content').show();},
        function(item) {item.find('input.radiochecked').removeClass('radiochecked').trigger('click');}
    ]};

var template_regions = {
        {% for template in available_templates.values %}'{{ template.key }}': [{% for region in template.regions %}'{{ region.key }}'{% if not forloop.last %}, {% endif %}{% endfor %}]{% if not forloop.last %},{% endif %}
        {% endfor %}
};
</script>
